import request from '@/utils/request'

let StatisticsApi = {
  /*订单数据统计*/
  getOrderTotal(data, errorback) {
    return request._post('/supplier/statistics.sales/index', data, errorback);
  },
  /*订单时间段统计*/
  getOrderByDate(data, errorback) {
    return request._post('/supplier/statistics.sales/order', data, errorback);
  },
  /*商品时间段统计*/
  getProductByDate(data, errorback) {
    return request._post('/supplier/statistics.sales/product', data, errorback);
  },
  /*会员数据统计*/
  getUserTotal(data, errorback) {
    return request._post('/supplier/statistics.user/index', data, errorback);
  },
  /*成交占比*/
  getUserScale(data, errorback) {
    return request._post('/supplier/statistics.user/scale', data, errorback);
  },
  /*访问统计*/
  getVisit(data, errorback) {
    return request._post('/supplier/statistics.user/visit', data, errorback);
  },

  /*会员增长数据统计*/
  getUserAddTotal(data, errorback) {
    return request._post('/supplier/statistics.user/manage', data, errorback);
  },
  /*新增会员*/
  getNewUser(data, errorback) {
    return request._post('/supplier/statistics.user/new_user', data, errorback);
  },
  /*成交会员数*/
  getPayUser(data, errorback) {
    return request._post('/supplier/statistics.user/pay_user', data, errorback);
  },

  /*佣金统计*/
  getSupplierCommissionList(data, errorback) {
    return request._post('/supplier/statistics.supplier/getSupplierCommissionList', data, errorback);
  },


  /*提现记录*/
  getWithdrawalList(data, errorback) {
    return request._post('/supplier/statistics.supplier/getWithdrawalList', data, errorback);
  },

  /*提现*/
  withdrawal(data, errorback) {
    return request._post('/supplier/statistics.supplier/withdrawal', data, errorback);
  },

  /*时间列表*/
  getDateList(data, errorback) {
    return request._get('/supplier/statistics.supplier/getDateList', data, errorback);
  },/*时间列表*/
  getSmsByDate(data, errorback) {
    return request._get('/supplier/statistics.sms/index', data, errorback);
  },
}

export default StatisticsApi;
